home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / biz / patch / fw5030r6.lha / Install FinalWriter-030 < prev    next >
Text File  |  1997-02-11  |  2KB  |  85 lines

  1. ; $VER: FinalWriter-030_Install 1.19 (11.2.97)
  2.  
  3. (set version "5.0")
  4.  
  5. (onerror (exit (quiet)))
  6.  
  7. (message
  8.     "\n\nFinalWriter " version " '030"
  9.     "\nCopyright 1995-96 Martin Berndt"
  10.     "\n\n\n!!! This Patch is SHAREWARE !!!"
  11.     "\n\nPlease read the \"ReadMe.txt\" file."
  12. )
  13.  
  14. (set @default-dest
  15.     (askdir
  16.         (prompt "Where is your FinalWriter Drawer?")
  17.         (help @askfile-help)
  18.         (default "SYS:FinalWriter")
  19.         (newpath)
  20.     )
  21. )
  22.  
  23. (set language
  24.     (askchoice
  25.         (prompt "Select your version")
  26.         (help @askchoice-help)
  27.         (choices "US1  5.0   7-Jun-96 (American English)"
  28.              "US2  5.03 28-Jun-96 (American English)"
  29.              "US3  5.04  8-Jul-96 (American English)"
  30.              "US4  5.06  9-Oct-96 (American English)"
  31.              "GB1  5.04  8-Jul-96 (British English)"
  32.              "GB2  5.05  3-Aug-96 (British English)"
  33.              "GER1 5.05  3-Aug-96 (German)"
  34.              "GER2 5.06  9-Oct-96 (German)")
  35.     )
  36. )
  37.  
  38. (set backup
  39.     (askoptions
  40.         (prompt "Options")
  41.         (help @askoptions-help)
  42.         (choices "Create Backup Files")
  43.     )
  44. )
  45.  
  46. (set n 0)
  47. (set percent 0)
  48.  
  49. (while (set name (select n "FinalWriter" "swpost.library" "swshell.library"
  50.                "cachemap.library" "qfont.library" "")) (
  51.     (set n (+ n 1))
  52.     (complete percent)
  53.     (if (= n 1)
  54.         (set file name)
  55.         (set file ("FWLibs/%s" name))
  56.     )
  57.     (set newfile (tackon @default-dest file))
  58.     (set oldfile (cat newfile ".bak"))
  59.     (if (= (exists newfile) 0)
  60.         (abort name " not found!")
  61.     )
  62.     (rename newfile oldfile)
  63.     (if (< n 4) (
  64.                 (if (= n 1) (
  65.                         (set name (cat name (select language "US1" "US2" "US3" "US4" "GB1" "GB2" "GER1" "GER2")))
  66.                 ))
  67.         (working "\n\nPatching\n" newfile)
  68.         (if (<> (run ("spatch \"-o%s\" \"-p%s.pch\" \"%s\"" newfile name oldfile)) 0) (
  69.             (rename oldfile newfile)
  70.             (abort "Wrong Version!")
  71.         ))
  72.         (set percent (+ percent 30))
  73.     ) (
  74.         (copyfiles
  75.             (prompt "Copying " name)
  76.             (help @copyfiles-help)
  77.             (source name)
  78.             (dest (tackon @default-dest "FWLibs"))
  79.             (optional "force" "askuser")
  80.         )
  81.         (set percent (+ percent 5))
  82.     ))
  83.     (if (= backup 0) (delete oldfile))
  84. ))
  85.